$_SERVER['HTTP_HOST'] not set

Posted by yes123 on Stack Overflow See other posts from Stack Overflow or by yes123
Published on 2011-01-01T12:38:03Z Indexed on 2011/01/02 17:53 UTC
Read the original article Hit count: 139

Filed under:
|

Hi guys,

I am getting lot of traffic to my php pages but without the variable $_SERVER['HTTP_HOST'] setted.

This traffic is like 1 hit per second. I don't know what it could be, but for reducing server load i am doing this at the top of every php pages:

if (!isset($_SERVER['HTTP_HOST']))
    exit;

Do u know what could cause this? Is it safe to exit whenever http_host is not setted? Can a normal user visit my pages without setting http_host?

PHP version: 5.2.0-8, Apache: 2.2.3

Thanks

© Stack Overflow or respective owner

Related posts about php

Related posts about apache